<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>CSS基本语法</title> 
<style>
.dropdown{
    position: relative;
    display: inline-block;
    top:30px;
}
.dropdown-content{
    display: none;/*默认不显示*/
    position: absolute; /*定位到已定位的父元素*/
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
/*在鼠标放到.dropdown类元素时，显示里面的content*/
.dropdown:hover .dropdown-content{
    display: block;
}
</style>
</head>
<body>
   <div class="dropdown">
       <span>鼠标移到到我这！</span>
       <div class="dropdown-content">
           <p>显示内容1</p>
           <p>显示内容2</p>
       </div>
   </div>
</body>
</html>

